#pragma once
#ifndef TEXTUREOGL_H_
#define TEXTUREOGL_H_

#include "texture.h"
#include "sdl_opengl.h"

namespace EPOC
{
	class TextureOGL : public Texture
	{
	public:
		TextureOGL();
		TextureOGL(class GraphicsManager *pGraphicsManager);
		virtual ~TextureOGL();

		virtual void Cleanup();
		virtual bool Initialize(std::string sName, std::string sFilePath, SDL_Surface *pSDLSurface, bool bExclusive = false, bool bEditable = false);	
		virtual bool UpdateTexture();
			
		virtual GLuint BuildGLTexture(SDL_Surface *pSDLSurface, bool bRemove = true);
	
		inline GLuint GetGLTexture()				{ return m_hTexture;}
		inline bool IsEditable()					{ return m_bEditable;}

	protected:
		inline void SetGLTexture(GLuint hTexture)	{ m_hTexture = hTexture;}
		virtual bool RebuildGLTexture();

	protected:
		bool m_bEditable;
		GLuint m_hTexture;

	}; // class TextureOGL
}; // namespace EPOC

#endif